/**
 * 
 */
package com.desksoft.ecommerce.vo.mall;


import java.util.ArrayList;
import java.util.List;

import com.desksoft.ecommerce.entity.mall.dto.Presentlist;
import com.desksoft.ecommerce.entity.mall.dto.Promotionitem;


/***************************************
 * <pre>
 * 版权所有：杭州迪科软件 保留所有权利
 * 创建日期:2012-5-25, 下午3:09:06
 * 创建作者：JH
 * 文件名称：PromotionItemVO.java
 * 版本：
 * 功能：
 * 最后修改时间：2012-5-25, 下午3:09:06
 * 修改记录：
 * </pre>
 *****************************************/
public class PromotionItemVO extends Promotionitem {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8057260648378084066L;

	/**
	 * 
	 */
	
	private String currentDate;
	
	/**
	 * 前台显示促销列表
	 */
	private String intervalQty;
	
	private Integer week;
   
	private String r00217;
    private String saleMode;
    /*
     * 默认不等于10 每日特价
     */
    private String r00102a;
    private String combineType;
    /*
     * 网站会话ID
     */
    private String sid;
    /*
     * 用户编码
     */
    private String userid;
    /*
     * 总部编码
     */
    private String dccdoe;
    
    /*
     * 门店编码
     */
    private String pstorecode;
    
    /*
     * 网站类型 = 'N'
     */
    private String dctype;

	/*
     * 促销商品信息
     */
    private Presentlist presentlist;
    /*
     * 促销信息集合
     */
    protected List<PromotionItemVO> items = new ArrayList<PromotionItemVO>();
    
    private List<Presentlist> aspresentlist = new ArrayList<Presentlist>();
    
    /*
     * 实际数量
     */
    public int qty;
    
    /*
     *赠品小计 
     */
    public float subtotal;
    
    
    /*
     * 客户编码
     */
    public String clientcode;
    
    /*
     * 特价品标志
     */
    public String promflag;

    /*
     * 选择的促销商品编码
     */
    public String pitemcode;
    
    /*
     * 选择的促销信息ID
     */
    public long pinfoid;
    
    /*
     * 选择促销编码
     */
    public String pr00201;
    
    //排斥文字显示
    public String prepel;
    
    private String pinnerseq;
    
	public String getPinnerseq() {
		return pinnerseq;
	}
	public void setPinnerseq(String pinnerseq) {
		this.pinnerseq = pinnerseq;
	}
	public List<Presentlist> getAspresentlist() {
		return aspresentlist;
	}
	public void setAspresentlist(List<Presentlist> aspresentlist) {
		this.aspresentlist = aspresentlist;
	}

	/*
     * 记录排斥促销的规则编码
     */
    public String rer00201;
	
	public String getRer00201() {
		return rer00201;
	}
	public void setRer00201(String rer00201) {
		this.rer00201 = rer00201;
	}
	public String getPrepel() {
		return prepel;
	}
	public void setPrepel(String prepel) {
		this.prepel = prepel;
	}
	public String getPr00201() {
		return pr00201;
	}
	public void setPr00201(String pr00201) {
		this.pr00201 = pr00201;
	}
	public String getPitemcode() {
		return pitemcode;
	}
	public void setPitemcode(String pitemcode) {
		this.pitemcode = pitemcode;
	}
	public long getPinfoid() {
		return pinfoid;
	}
	public void setPinfoid(long pinfoid) {
		this.pinfoid = pinfoid;
	}
	public String getPromflag() {
		return promflag;
	}
	public void setPromflag(String promflag) {
		this.promflag = promflag;
	}
	public String getClientcode() {
		return clientcode;
	}
	public void setClientcode(String clientcode) {
		this.clientcode = clientcode;
	}
	public float getSubtotal() {
		return subtotal;
	}
	public void setSubtotal(float subtotal) {
		this.subtotal = subtotal;
	}
	
	public int getQty() {
		return qty;
	}
	public void setQty(int qty) {
		this.qty = qty;
	}
	
	public PromotionItemVO(){
		
	}
	public PromotionItemVO(Presentlist presentlist) {
		this.presentlist = presentlist;
	}
	
	public PromotionItemVO(Presentlist presentlist,int qty){
		this.presentlist= presentlist;
		this.qty = qty;
	}
	
	public String getPstorecode() {
		return pstorecode;
	}
	public void setPstorecode(String pstorecode) {
		this.pstorecode = pstorecode;
	}
	public void setItems(List<PromotionItemVO> items) {
		this.items = items;
	}
    
    public List<PromotionItemVO> getItems() {
		return items;
	}
	public Presentlist getPresentlist() {
		return presentlist;
	}
	public void setPresentlist(Presentlist presentlist) {
		this.presentlist = presentlist;
	}
	public String getSid() {
		return sid;
	}
	public void setSid(String sid) {
		this.sid = sid;
	}
	public String getUserid() {
		return userid;
	}
	public void setUserid(String userid) {
		this.userid = userid;
	}
	public String getDccdoe() {
		return dccdoe;
	}
	public void setDccdoe(String dccdoe) {
		this.dccdoe = dccdoe;
	}
	public String getDctype() {
		return dctype;
	}
	public void setDctype(String dctype) {
		this.dctype = dctype;
	}
	public Integer getWeek() {
		return week;
	}
	public void setWeek(Integer week) {
		this.week = week;
	}
	public String getCombineType() {
		return combineType;
	}
	public void setCombineType(String combineType) {
		this.combineType = combineType;
	}
	public String getR00217() {
		return r00217;
	}
	public void setR00217(String r00217) {
		this.r00217 = r00217;
	}
	public String getSaleMode() {
		return saleMode;
	}
	public void setSaleMode(String saleMode) {
		this.saleMode = saleMode;
	}
	public String getR00102a() {
		return r00102a;
	}
	public void setR00102a(String r00102a) {
		this.r00102a = r00102a;
	}
	
//	@Override
//	public int hashCode() {
//		String buyitemid = presentlist.hashCode()+ "-";
//		return buyitemid.hashCode();
//	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj){
			return true;
		}
		if (obj == null){
			return false;
		}
		if (getClass() != obj.getClass()){
			return false;
		}
		final PromotionItemVO other = (PromotionItemVO) obj;
		if (!presentlist.getItemcode().equals( other.getPresentlist().getItemcode())) {
		  return false;
		} 
		if(!presentlist.getR00201().equals(other.getPresentlist().getR00201())){
			return false;
		}
		return true;
	}
	public void setIntervalQty(String intervalQty) {
		this.intervalQty = intervalQty;
	}
	public String getIntervalQty() {
		return intervalQty;
	}
	public void setCurrentDate(String currentDate) {
		this.currentDate = currentDate;
	}
	public String getCurrentDate() {
		return currentDate;
	}
}
